{% extends "base.html" %}
{% block title %}Revivir Items{% endblock %}
{% block body %}
  <h2>Revivir Items</h2>
  {% if error %}<div class=error><strong>Error:</strong> {{ error }}</div>{% endif %}
  <form action="" method=post>
      <table>
          <TR>
              <TD><input type=text name=cadena size=30 value="{{ cadena }}"></TD>
              <TD><select name="campos">
                  <option {% if set_etc == "todos" %} selected="selected" {% endif %} value="todos">Todos</option>
                  <option {% if set_etc == "nombre" %} selected="selected" {% endif %} value="nombre">Nombre</option>
                  <option {% if set_etc == "descripcion" %} selected="selected" {% endif %} value="nombre">Descripcion</option>
                  <option {% if set_etc == "observacion" %} selected="selected" {% endif %} value="descripcion">Observacion</option>
                  <option {% if set_etc == "estado" %} selected="selected" {% endif %} value="nombre">Estado</option>
                  <option {% if set_etc == "complejidad" %} selected="selected" {% endif %} value="descripcion">Complejidad</option>
                  <option {% if set_etc == "costo" %} selected="selected" {% endif %} value="nombre">Costo</option>
                  <option {% if set_etc == "tipo item" %} selected="selected" {% endif %} value="observacion">Tipo Item</option>
              </TD>
              <TD><input type=submit name="action" value=Buscar></TD>
              <TD><input type=submit name="action" value=Limpiar></TD>
          </TR>
      </table>
      <br>
      <table>
          <TR>
              <TD><input type=submit name="action" value=Revivir></TD>
              <TD><button type=submit name="action" value=Salir>Regresar</button></TD>
          </TR>
      </table>
      <br>
      <table>
          <TR>
              <TD>Seleccionar</TD>
              <TD>Nombre</TD>
              <TD>Descripcion</TD>
              <TD>Observacion</TD>
              <TD>Estado</TD>
              <TD>Version</TD>
              <TD>Complejidad</TD>
              <TD>Costo</TD>
              <TD>Tipo Item</TD>
          </TR>
          {% for item in items %}
          <TR>
            <td><input type=checkbox name=seleccionados value={{ item.id }}></td>
            <TD class="c1">{{item.nombre}}</TD>
            <TD class="c2">{{item.descripcion}}</TD>
            <TD class="c3">{{item.observacion}}</TD>
            <TD class="c4">{{item.estado}}</TD>
            <TD class="c5">{{item.version}}</TD>
            <TD class="c6">{{item.complejidad}}</TD>
            <TD class="c7">{{item.costo}}</TD>
            <TD class="c8">{{item.tipo_item}}</TD>
          </TR>
          {% endfor %}
      </table>
    </form>
{% endblock %}
